﻿/*******************************************************************************
 * Copyright © 2016 NFine.Framework 版权所有
 * Author: NFine
 * Description: NFine快速开发平台
 * Website：http://www.nfine.cn
*********************************************************************************/

using System;
using NFine.Data;
using NFine.Domain._03_Entity.Biz;
using NFine.Domain.Entity.SystemManage;

namespace NFine.Domain.IRepository.SystemManage
{
    public interface IUserRepository : IRepositoryBase<UserEntity>
    {
        void DeleteForm(string keyValue);
        int SubmitForm(UserEntity userEntity, UserLogOnEntity userLogOnEntity, string keyValue, UserDetailEntity userDetil=null);

        int GetAllMemberCount(string roleId, string tid);

        int GetAllMemberCurMonth(string roleId, string tid);

        int GetMemberCountByDate(DateTime date ,string roleId, string tid);
        int GetMemberCountByDepartmentIdAndUserId(string departmentId,string userId = "");
        /// <summary>
        /// 更新用户对象和用户实体对象
        /// </summary>
        /// <param name="ud"></param>
        /// <param name="u"></param>
        /// <returns></returns>
        bool UpdateUser(UserDetailEntity ud, UserEntity u);
        /// <summary>
        /// 自动删除超过30天未支付的用户
        /// </summary>
        /// <returns></returns>
        int userDelete_auto();
    }
}
